#ifndef LOGGINGINDIALOG_H
#define LOGGINGINDIALOG_H

#include <QDialog>
#include"global.h"

namespace Ui {
class LoggingInDialog;
}

class LoggingInDialog : public QDialog
{
    Q_OBJECT

public:
    explicit LoggingInDialog(QWidget *parent = nullptr);
    ~LoggingInDialog();
    void connectTcp(const ServerInfo& s);
    void setPixmap(const QPixmap& pixmap);

private:
    void showTip(const QString& test, bool isOk);

private slots:
    void slot_tcp_con_finish(bool bsuccess);

signals:
    void sig_tcp_connect(const ServerInfo&);
    void sig_switch_main(const QString&);

private:
    Ui::LoggingInDialog *ui;
    QString _user{""};
    QString _token{""};
    QTimer *_timer;
    QString _LoginTip{"正在登录"};
    int _num{1};
};

#endif // LOGGINGINDIALOG_H
